<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <div :style="{'color':color, 'fontSize': fontSize + 'px'}">文本</div>
    </div>

    <script>
        var app = new Vue({
            el: '#app',
            data:{
                color:'red',
                fontSize: 14
            }
        })
    </script>
</body>
</html>